package com.selp.ork.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class TestController {

    TestController(){
        System.out.println("对象实例化");
    }

    @RequestMapping("add")
    public ModelAndView add(){
        System.out.print("访问add-------");
        ModelAndView modelAndView = new ModelAndView();
        modelAndView.addObject("teamName","首页");
        modelAndView.setViewName("index");
        return modelAndView;
    }
}
